<template>
    <div class="msg">
        <com></com>
        <div class="msg-right">
            <el-form v-model="set" style="width:400px; padding-top:80px;" ref="numberValidateForm" label-width="100px" class="demo-ruleForm">
        <el-form-item
            label="用户名"
            prop="name"
        > <el-input  v-model="set.name" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item
            label="学校"
            prop="school"
        > <el-input type="text" v-model="set.school" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item
            label="地址"
            prop="address"
        > <el-input type="text" v-model="set.address" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item
            label="密码"
            prop="pass"
        > <el-input type="password" v-model="set.pass" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item>
            <el-button type="primary" @click="jump()">修改</el-button>
        </el-form-item>
        </el-form>
        </div>
        <router-view></router-view>
    </div>
</template>
<script>
import { mapMutations, } from 'vuex'
export default ({
    name:'msg',
    data(){
        return{
            set:JSON.parse(JSON.stringify(this.$store.state.login)),
        }
    },
    methods:{
        ...mapMutations(['loginUs']),
        jump(){
            // this.loginUs(this.set)
            this.loginUs(JSON.parse(JSON.stringify(this.set)))
            this.set= []
        },
    }
})
</script>
<style lang="scss" scoped>
.msg{
    margin-left: 300px;
}

</style>
